package cn.lingyangwl.framework.lock.manager;

import cn.lingyangwl.framework.lock.model.ILock;
import cn.lingyangwl.framework.lock.model.RedissonLock;
import org.redisson.Redisson;

/**
 * @author shenguangyang
 */
public class RedissonManager implements ILockManager {

    private final Redisson redisson;

    public RedissonManager(Redisson redisson) {
        this.redisson = redisson;
    }

    @Override
    public ILock getLock(String lockKey) {
        return new RedissonLock(lockKey, redisson);
    }
}
